package VUTHANHPHUC_HOMEWORK_OOP;

public class DateModels {
	public int CheckDayOfMonth(Date objC) {
		if (objC.getMonth() == 4 && objC.getMonth() == 6 && objC.getMonth() == 9 && objC.getMonth() == 11)
			return 30;
		if (objC.getMonth() == 2) {
			if (objC.getYear() % 4 == 0 && (objC.getYear() % 400 == 0 || objC.getYear() % 100 != 0))
				return 29;
			return 28;
		}
		return 31;
	}
}
